Generalized algebraic data type